<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:dataTable var="faq" value="#{faqModel.list}" filteredValue="#{faqModel.filteredList}" filterEvent="enter"
		rowKey="#{faq.id}" selection="#{faqModel.current}"
		selectionMode="single" paginatorAlwaysVisible="false" paginator="true"  rows="20"
		rowsPerPageTemplate="5,7,10,15,20,30,40,50"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
		<p:ajax event="rowSelect" update=":detailForm,:headerForm"
			listener="#{faqController.onRowSelect}"></p:ajax>
		<p:column headerText="id">
			<h:outputText value="#{faq.id}" />
		</p:column>
		<p:column headerText="Type" sortBy="#{faq.type.label}"
			filterBy="#{faq.type.label}" filterMatchMode="contains">
			<h:outputText value="#{faq.type.label}" />
		</p:column>
		<p:column headerText="Question" sortBy="#{faq.question}"
			filterBy="#{faq.question}" filterMatchMode="contains"
			style="max-width:50px">
			<h:outputText value="#{faq.question}" />
		</p:column>
	</p:dataTable>
</ui:composition>
</html>